Layout DXL make a string bold

How do I make the following sting "s" appear bold in a Layout DXL column?

s = probeRichAttr_(othero,"My Text", true)
s = "My Text:" s
if (s == "")
displayRich("\\pard " " ")
else
displayRich("\\pard " s)
SystemAdmin - Wed Feb 29 11:25:53 EST 2012

Re: Layout DXL make a string bold
adevicq - Wed Feb 29 11:45:30 EST 2012

Hi,

Just add "\\b " before the string:
 

displayRich "\\b " s

 


regards,

alain

 

Re: Layout DXL make a string bold
SystemAdmin - Wed Feb 29 12:28:04 EST 2012

adevicq - Wed Feb 29 11:45:30 EST 2012

Hi,

Just add "\\b " before the string:
 

displayRich "\\b " s

 


regards,

alain

 

I tried this but only the static text becomes bold...

e.g.

My Text: the value of my text

Re: Layout DXL make a string bold
Mathias Mamsch - Wed Feb 29 17:05:20 EST 2012

SystemAdmin - Wed Feb 29 12:28:04 EST 2012
I tried this but only the static text becomes bold...

e.g.

My Text: the value of my text

Changing richText is always problematic. If you use probeRichAttr to read the richText you get something like:
 

{\rtf1\ansi\ansicpg1252\deff0{\fonttbl ... \}\pard Some text }

 


if you now prepend \b before it you get:

 

 

 

\b {\rtf1\ansi\ansicpg1252\deff0{\fonttbl ... \}\pard Some text}



which is not even valid richText anymore. DOORS handles a lot of this gracefully, but in your case the \pard that you have in each normal richText attribute will reset the bold statement again. Therefore you should not extract richText but only normal text using probeAttr. Alternatively you could try 'richTextFragment' to cut off the RTF header of the attribute value before prepending the \b.

Hope that helps, Regards, Mathias



 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS